package com.android.Servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.sql.SQLException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.android.Bean.LinkMainBean;

@SuppressWarnings("serial")
public class LinkManViewServlet extends HttpServlet {

	/**
		 * 查看联系人
		 */
	public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doPost(request, response);
	}

	
	public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		LinkMainBean linkMainBean=new LinkMainBean();
		response.setCharacterEncoding("gbk");
		PrintWriter pw =response.getWriter();
		try {
			pw.append(linkMainBean.linkMainSelect());
			pw.flush();
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}

}
